package com.anjoyo.xgh.musicshare.db;

import net.tsz.afinal.exception.DbException;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class MusicDB extends SQLiteOpenHelper {

	public MusicDB(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "create table musictable(id integer primary key autoincrement,"+
				"musicid varchar,"+
				"name varchar,"+
				"artist varchar,"+
				"album_image varchar,"+
				"album varchar,"+
				"data varchar,"+
				"net_url varchar,"+
				"isnetmusic varchar,"+
				"isoffline varchar,"+
				"isfav varchar,"+
				"isdownload varchar"+
				")";
		db.execSQL(sql);
		String sql2 = "create table sharetable(id integer primary key autoincrement,"+
				"share varchar"+
				")";
		db.execSQL(sql2);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}

}
